<?php
if(isset($_FILES['my_little_file']) && !$_FILES['my_little_file']['error']) {
	$uploadfile = 'files/' . basename($_FILES['my_little_file']['name']);
	if (move_uploaded_file($_FILES['my_little_file']['tmp_name'], $uploadfile)) {
		echo "File is valid, and was successfully uploaded (" . ((int)($_FILES['my_little_file']['size']/1024)) ." KB).<br/>";
		echo "<a href='" . $uploadfile . "'>View uploaded file: " . $_FILES['my_little_file']['name'] ."</a><br/>";
	} else {
		echo "Possible file upload attack!\n";
	}
} else {
	die('No file attached or error occured.');
}
?>